﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using SARUserControls.ChangJingCanshu.DialogFrames;

namespace SARUserControls
{
    public partial class AttrPage4 : DialogPageBase
	{
		public AttrPage4()
		{
			this.InitializeComponent();

			// 在此点之下插入创建对象所需的代码。
		}

        #region DialogPageBase Members

        public string getTitle()
        {
            return "两面角反射器";
        }

        public IDictionary<string, object> getValues()
        {
            IDictionary<string, object> result = new Dictionary<string, object>();
            result.Add("changdu", txtChangdu.SARContentTxt);
            result.Add("kuandu", txtKuandu.SARContentTxt);
            return result;
        }

        public IDictionary<string, object> getDefaultValues()
        {
            IDictionary<string, object> result = new Dictionary<string, object>();
            result.Add("changdu", 3);
            result.Add("kuandu", 3);
            return result;
        }

        public void setValues(IDictionary<string, object> values)
        {
            if (values.ContainsKey("changdu"))
            {
                txtChangdu.SARContentTxt = Double.Parse(values["changdu"].ToString());
            }
            if (values.ContainsKey("kuandu"))
            {
                txtKuandu.SARContentTxt = Double.Parse(values["kuandu"].ToString());
            }
        }

        #endregion
    }
}